//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { CustomerLevel, CustomerLevelResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooCustomerLevelList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<CustomerLevelResponse>(`/uctoo/customer_level/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooCustomerLevel = async (id: string) => {
  return requestClient.get<CustomerLevel>(`/uctoo/customer_level/${id}`);
};

export const adductooCustomerLevel = async (data: Partial<CustomerLevel>) => {
  return requestClient.post<CustomerLevel>('/uctoo/customer_level/add', data);
};

export const edituctooCustomerLevel = async (data: Partial<CustomerLevel>) => {
  return requestClient.post<CustomerLevel>('/uctoo/customer_level/edit', data);
};

export const deleteuctooCustomerLevel = async (id: string) => {
  return requestClient.post<any>('/uctoo/customer_level/del', { id });
};
